home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / setsid.z / setsid
Encoding:
Text File  |  2002-10-03  |  3.6 KB  |  67 lines

  1.  
  2.  
  3.  
  4. sssseeeettttssssiiiidddd((((2222))))                                                            sssseeeettttssssiiiidddd((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ssss_eeee_tttt_ssss_iiii_dddd - set session ID
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_uuuu_nnnn_iiii_ssss_tttt_dddd_...._hhhh_>>>>
  14.  
  15.      _pppp_iiii_dddd______tttt _ssss_eeee_tttt_ssss_iiii_dddd_((((_vvvv_oooo_iiii_dddd_))))_;;;;
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      If the calling process is not already a process group leader, _ssss_eeee_tttt_ssss_iiii_dddd sets
  19.      the process group ID and session ID of the calling process to the process
  20.      ID of the calling process, and releases the process's controlling
  21.      terminal.
  22.  
  23.      _ssss_eeee_tttt_ssss_iiii_dddd will fail and return an error if the following is true:
  24.  
  25.      _EEEE_PPPP_EEEE_RRRR_MMMM          The calling process is already a process group leader, or
  26.                     there are processes other than the calling process whose
  27.                     process group ID is equal to the process ID of the calling
  28.                     process.
  29.  
  30. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  31.      _iiii_nnnn_tttt_rrrr_oooo(2), _eeee_xxxx_eeee_cccc(2), _eeee_xxxx_iiii_tttt(2), _ffff_oooo_rrrr_kkkk(2), _gggg_eeee_tttt_pppp_iiii_dddd(2), _gggg_eeee_tttt_pppp_gggg_iiii_dddd(2), _gggg_eeee_tttt_ssss_iiii_dddd(2),
  32.      _ssss_eeee_tttt_pppp_gggg_iiii_dddd(2), _ssss_eeee_tttt_pppp_gggg_rrrr_pppp, _ssss_iiii_gggg_nnnn_aaaa_llll(2), _ssss_iiii_gggg_ssss_eeee_nnnn_dddd(2), _ssss_iiii_gggg_aaaa_cccc_tttt_iiii_oooo_nnnn(2).
  33.  
  34. NNNNOOOOTTTTEEEESSSS
  35.      If the calling process is the last member of a pipeline started by a job
  36.      control shell, the shell may make the calling process a process group
  37.      leader.  The other processes of the pipeline become members of that
  38.      process group. In this case, the call to _ssss_eeee_tttt_ssss_iiii_dddd will fail.  For this
  39.      reason, a process that calls _ssss_eeee_tttt_ssss_iiii_dddd and expects to be part of a pipeline
  40.      should always first fork; the parent should exit and the child should
  41.      call _ssss_eeee_tttt_ssss_iiii_dddd, thereby insuring that the process will work reliably when
  42.      started by both job control shells and non-job control shells.
  43.  
  44. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  45.      Upon successful completion, _ssss_eeee_tttt_ssss_iiii_dddd returns the calling process's session
  46.      ID.  Otherwise, a value of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to indicate
  47.      the error.
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.